#include<bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const int N = 2e5 + 10;
#define INF 0x3f3f3f3f;
typedef long long int ll;
#define close(); std::ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
const ll mod = 998244353;
//----------------------------------------------------------------------------//
ll fac(ll x)
{
	ll f = 1;
	for (ll i = 1; i <= x; i++)  f=(f*i)%mod;
	//cout<<f<<'\n';
	return f;
}
void solve()
{
	ll n;
	cin >> n;
	if (n % 2 != 0)
	{
		cout << 0 << '\n';
		return;
	}

	ll t = fac(n / 2);
	//cout<<t<<'\n';
	t %= mod;
	t *= t;
	t %= mod;
	cout << t<<'\n';

}

int main()
{
	close();
	int T; cin >> T;
	while (T--) solve();
	return 0;
}